#include<iostream>
#include <memory>
#include <string>
#include "tcp_client.hpp"

using namespace std;
using namespace ns_client;

void Usage(const char* proc)
{
    cout << "Usage:" << endl;
    cout << "\t" << proc << " ip port" << endl;
}

int main(int argc, char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        return USER_ERR;
    }

    string ip = argv[1];
    int port = stoi(argv[2]);

    unique_ptr<TcpClient> tsvr(new TcpClient(ip, port));
    
    tsvr->InitClient();
    tsvr->StartClient();

    return 0;
}